<?php

class Avatar_Form_Admin_Avatarcollections_Avatarcollections extends Engine_Form {
	
	public function init() {
		$this->setMethod ( 'post' )->setAttrib ( 'class', 'global_form_box' )->setAttrib ( 'enctype', 'multipart/form-data' );
		
		$this->addElement ( 'Text', 'name', array ('label' => 'Title', 'allowEmpty' => false, 'required' => true, 'filters' => array ('StringTrim' ) ) );
		
		$this->addElement ( 'Textarea', 'description', array ('label' => 'Description', 'allowEmpty' => true, 'filters' => array ('StringTrim', new Zend_Filter_PregReplace ( '/(")/i', '\'' ) ) ) );
		
		// Buttons
		$this->addElement ( 'Button', 'submit', array ('label' => 'Save Collection', 'type' => 'submit', 'ignore' => true, 'decorators' => array ('ViewHelper' ) ) );
		
		$this->addElement ( 'Cancel', 'cancel', array ('label' => 'cancel', 'link' => true, 'prependText' => ' or ', 'href' => '', 'onClick' => 'javascript:parent.Smoothbox.close();', 'decorators' => array ('ViewHelper' ) ) );
		$this->addDisplayGroup ( array ('submit', 'cancel' ), 'buttons' );
		$button_group = $this->getDisplayGroup ( 'buttons' );
	
	}

}